import request from './request.js';
//字典
export function getdict(data) {
	return request({
		url: `/system/dict/data/type/${data}`,
		method: 'get',
	})
}

// 登录
export function getlogin(data) {
	return request({
		url: '/login',
		method: 'POST',
		data
	})
}

// 获取验证码
export function getText() {
	return request({
		url: '/captchaImage',
		method: 'get',
	})
}
// 拿到个人信息
export function getUserinfo() {
	return request({
		url: '/getInfo',
		method: 'get',
	})
}
//退出
export function logout() {
	return request({
		url: '/logout',
		method: 'post'
	})
}

//报价单列表：{keyWord，createTimeBegin，createTimeEnd}
export function orderList(data) {
	return request({
		url: '/orders/list',
		method: 'post',
		data
	})
}
export function orderRemove(data) {
	return request({
		url: '/orders/remove',
		method: 'post',
		data
	})
}
//添加报价单：
export function orderAdd(data) {
	return request({
		url: '/orders/add',
		method: 'post',
		data
	})
}
//添加报价单：
export function orderEdit(data) {
	return request({
		url: '/orders/edit',
		method: 'post',
		data
	})
}
export function orderInfo(data) {
	return request({
		url: '/orders/info',
		method: 'post',
		data
	})
}
//检索客户信息：{customerName}
export function customerList(data) {
	return request({
		url: '/customer/list',
		method: 'post',
		data
	})
}

export function contractList(data) {
	return request({
		url: '/contract/list',
		method: 'post',
		data
	})
}
export function contractRemove(data) {
	return request({
		url: '/contract/remove',
		method: 'post',
		data
	})
}
export function contractAdd(data) {
	return request({
		url: '/contract/add',
		method: 'post',
		data
	})
}
export function contractEdit(data) {
	return request({
		url: '/contract/edit',
		method: 'post',
		data
	})
}
export function contractInfo(data) {
	return request({
		url: '/contract/info',
		method: 'post',
		data
	})
}
export function ordersPdf(data) {
	return request({
		url: `/orders/pdf?id=${data.id}`,
		method: 'post',
		
	})
}
export function contractPdf(data) {
	return request({
		url: `/contract/pdf?id=${data.id}`,
		method: 'post',
	})
}
//查询客户信息
export function customer(data) {
	return request({
		url:'/orders/customer',
		method: 'post',
		data
	})
}
//查询产品名字和规格：type: 1名字 2规格name: 
export function customerspecs(data) {
	return request({
		url:'/product/name/specs/list',
		method: 'post',
		data
	})
}

